package cn.steel.mapper;

import cn.steel.domain.entity.Message;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageMapper {
    // 插入一条消息
    void insertMessage(Message message);
    //根据发送者和接收者ID查找消息
    List<Message> findMessagesBySenderAndReceiver(Long senderId, Long receiverId);
   // 更新消息的已读状态
    void updateMessageReadStatus(Long id, Boolean isRead);
    // 查找未读消息
    List<Message> findUnreadMessagesByReceiver(Long receiverId);
}